--Test1
--Francico Amoros Cubells

love.filesystem.load("Player.lua")()

keypres = ""

function love.load()

    hero_plr = PlyNew( "sptortuga.png", 32, 32 , 100, 100 )
    hero_plr:insertAction("up", "up",  2, 32, 200, 1, "move")
    hero_plr:insertAction("down", "down",  32, 32*4, 200, 1, "move")
    hero_plr:insertAction("left", "left",  32*3, 32*3+7, 200, 1, "move")
    hero_plr:insertAction("right", "right",  12, 16, 200, 1, "move")

end


function love.draw()
    hero_plr:draw(100, 100, 0, 3, 3)
end

function love.keypressed(key)
    hero_plr:lastKey(key)
end

function love.update( dt )
    hero_plr:update( dt )

    love.timer.sleep(0.01)
end